package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CarImageMapper;
import com.ruoyi.system.domain.CarImage;
import com.ruoyi.system.service.ICarImageService;

/**
 * 吊车相关图片Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-09-09
 */
@Service
public class CarImageServiceImpl implements ICarImageService 
{
    @Autowired
    private CarImageMapper carImageMapper;

    /**
     * 查询吊车相关图片
     * 
     * @param id 吊车相关图片主键
     * @return 吊车相关图片
     */
    @Override
    public CarImage selectCarImageById(Long id)
    {
        return carImageMapper.selectCarImageById(id);
    }

    /**
     * 查询吊车相关图片列表
     * 
     * @param carImage 吊车相关图片
     * @return 吊车相关图片
     */
    @Override
    public List<CarImage> selectCarImageList(CarImage carImage)
    {
        return carImageMapper.selectCarImageList(carImage);
    }

    /**
     * 新增吊车相关图片
     * 
     * @param carImage 吊车相关图片
     * @return 结果
     */
    @Override
    public int insertCarImage(CarImage carImage)
    {
        carImage.setCreateTime(DateUtils.getNowDate());
        return carImageMapper.insertCarImage(carImage);
    }

    /**
     * 修改吊车相关图片
     * 
     * @param carImage 吊车相关图片
     * @return 结果
     */
    @Override
    public int updateCarImage(CarImage carImage)
    {
        carImage.setUpdateTime(DateUtils.getNowDate());
        return carImageMapper.updateCarImage(carImage);
    }

    /**
     * 批量删除吊车相关图片
     * 
     * @param ids 需要删除的吊车相关图片主键
     * @return 结果
     */
    @Override
    public int deleteCarImageByIds(Long[] ids)
    {
        return carImageMapper.deleteCarImageByIds(ids);
    }

    /**
     * 删除吊车相关图片信息
     * 
     * @param id 吊车相关图片主键
     * @return 结果
     */
    @Override
    public int deleteCarImageById(Long id)
    {
        return carImageMapper.deleteCarImageById(id);
    }
}
